﻿#include "pch.h"



////文件_取MIME类型
//std::string WoHaperGetMIMEType_Win(const void* pBuffer, DWORD cbSize) {
//	LPWSTR pwzMimeOut = NULL;
//	auto hr = FindMimeFromData(NULL, NULL, (LPVOID)pBuffer, cbSize, NULL, NULL, &pwzMimeOut, 0);
//	if (hr == S_OK && pwzMimeOut != NULL) {
//
//		int len = WideCharToMultiByte(CP_ACP, 0, pwzMimeOut, wcslen(pwzMimeOut), NULL, 0, NULL, NULL);
//		//char* l_char = (char*)malloc(len + 1);
//		char*r=new char[len + 1];
//		memset(r,0, len + 1);
//		WideCharToMultiByte(CP_ACP, 0, pwzMimeOut, wcslen(pwzMimeOut), r, len, NULL, NULL);
//		return  r;
//	}
//	return WEB_OCTET_STREAM;
//}



